package structural.proxy.dynamic_proxy.cglib;

import sun.misc.ProxyGenerator;

import java.io.FileOutputStream;

/**
 * @ClassName: MainTest
 * @Description: 测试类
 * @Author: liu-hao
 * @Date: 2023-04-09 21:46
 * @Version: 1.0
 **/
public class MainTest {
    public static void main(String[] args) {
        // 通过代理工厂获取代理对象
        Subject proxySubject = ProxyFactory.getProxyInstance(new RealSubject());
        // 调用代理对象增强后的方法
        proxySubject.request();
    }
}
